package com.tc.utils.image.test;


import com.tc.utils.image.tree.RectNode;

import java.io.IOException;

/**
 * Created by Frederic.Tang on 2018/8/22.
 */
public class TreeImgGen {


    public TreeImgGen() {


    }


    public static void main(String[] args) throws IOException {

        RectNode root = new RectNode("层002asdf层002asdf层002asdf层002asdf层002a").addChild("下一层001").addChild("下一层002asdf层002asdf层002asdf层002asdf层002asdf层002asdf层002asdf层002asdf层002asdfasdfasdfasfas");
        RectNode child = new RectNode("下一层003").addChild("第三层33").addChild("第三层3344");
        root.addChild(child);
        child = new RectNode("下一层003").addChild("第三层33").addChild("第三层3344").addChild("第三层3355");
        RectNode gcd = new RectNode("第三层3355").addChild("第三层33").addChild("第三层3344").addChild("第三层adfaddddddddddddddddddddddddddddddddd3355");
        child.addChild(gcd).addChild("第三层3355");
        root.addChild(child);
        child = new RectNode("下一层003-2").addChild("第三层332222").addChild("第三层334422").addChild("第三层3355222");
        root.addChild(child).addChild("下一层004");
        //root.calc();
        //TreeImgGen imgGen = new TreeImgGen();
        // imgGen.drawAll();
        root.write("d:/tree.jpg");
    }
}
